<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Listar Curriculuns</title>

<link rel="stylesheet" type="text/css" media="screen" href="css/vader/jquery-ui.css" />
<link rel="stylesheet" type="text/css" media="screen" href="css/ui.jqgrid.css" />

<script src="js/jquery-1.9.0.min.js" type="text/javascript"></script>
<script src="js/jquery-ui-1.10.3.custom.js"></script>
<script src="js/jquery.jqGrid.src.js" type="text/javascript"></script>
<script src="js/i18n/grid.locale-pt-br.js" type="text/javascript"></script>
<script type="text/javascript">
function confirmRemove(cellvalue, options, rowObject){
	var conf = confirm("Deseja exluir ?");
	if(conf == true){
		window.open('rmvCurriculo.php'+cellvalue,"_self");
	}
}
</script>
<script type="text/javascript">
	$(function(){
		jQuery('#list1').jqGrid({
			url:'listCurriculo.php',
			datatype:"json",
			mtype: 'GET',
			colNames:['ID','Nome','DataNasc','Cidade','UF','Altura(cm)','Peso','Sexo','Informações','Perfil','Entrevistar','Alterar','Excluir'],
			colModel:[
			{name:'id',index:'id',width:40, align:"center",search:true, searchoptions:{ sopt:['eq', 'ne'] }},
			{name:'nome',index:'nome',width:200},
			{name:'dataNasc',index:'dataNasc',width:70,align:"center"},
			{name:'cidade',index:'cidade',width:90,align:"center"},
			{name:'uf',index:'uf',width:40,align:"center"},
			{name:'altura',index:'altura',width:70,align:"center"},
			{name:'peso',index:'peso',width:40,align:"center"},
			{name:'sexo',index:'sexo',width:90,align:"center"},
			{name:'informacoes',index:'informacoes',search:false,width:80,align:"center",formatter:'showlink',formatoptions:{baseLinkUrl:'exibeInformacoes.php'}},
			{name:'perfil',index:'perfil',search:false,width:60,align:"center",formatter:'showlink',formatoptions:{baseLinkUrl:'formPerfil.php'}},
			{name:'entrevistar',index:'entrevistar',search:false,width:70,align:"center",formatter:'showlink',formatoptions:{
				baseLinkUrl:'formEntrevista.php',
				addParam:'&idVaga=0'}},
			{name:'alterar',index:'alterar',search:false,width:50,align:"center",formatter:'showlink',formatoptions:{baseLinkUrl:'formAlterarCurriculo.php'}},
			{name:'excluir',index:'exluir',search:false,width:50,align:"center",formatter:'showlink',formatoptions:{
				baseLinkUrl: 'javascript:',
				showAction:"confirmRemove('",
				addParam: "')"
			}}
			],
	
			height:300,
			rowNum:10,
			rowList:[10,20,30],
			pager: '#pager1',
			sortname:'id',
			viewrecords: true,
			gridview: true,
			sortorder: "asc",
			sortname:'id',
			caption:"Currículos"
		}).navGrid('#pager1',{view:true, edit:false,add:false, del:false, search: true, refresh: true}, 
{}, // use default settings for edit
{}, // use default settings for add
{},  // delete instead that del:false we need this
{ //search
	caption: "Procurando...",
     Find: "Procurar",
     Reset: "Limpar",
	 sopt:['eq','ne','lt','le','gt','ge','bw','bn','in','ni','ew','en','cn','nc'] ,
     groupOps: [ { op: "AND", text: "e" }, { op: "OR", text: "ou" } ],
     matchText: " encontrados",
     rulesText: " regras", showQuery: false},
{multipleSearch : true
}, // enable the advanced searching
/*{odata: ['igual a', 'diferente de', 'menor de que', 'menor ou igual a', 'maior do que', 'maior ou igual a', 'iniciando com', 'não iniciando com', 'está em', 'não está em', 'terminado com', 'não terminando com', 'contendo', 'não contendo']},
*/{closeOnEscape:true} /* allow the view dialog to be closed when user press ESC key*/
);

}); 
</script>

</head>

<body>
<h1>Lista de Currículos</h1>
<?php
if(@$_GET['verify']){
	if($_GET['verify']==1){	
		echo '<p><strong>Linha Alterada Com Sucesso</strong></p>';
	}
	elseif($_GET['verify']==0){ 
		echo '<p><strong>Erro ao Alterar Linha</strong></p>';
	}
}

?>
<table id="list1" name="list1"><tr><td></td></tr></table>
<div id="pager1" name="pager1"></div>
<p>
    <p align="center"><a href="index.php">Voltar para menu inicial</a></p>
</body>
</html>
